#ifndef STATEMANAGER_H
#define STATEMANAGER_H

#include <vector>

#include "gamestate.h"
#include "Players\player.h"
#include "Enemies\enemy.h"

enum class State{ //Indexes into array
	Battlefield = 0, Fight = 1, GameOver = 2
};

class StateManager
{
	public:
		static StateManager* Instance;

		StateManager();
		virtual ~StateManager() = default;

		void Draw();
		void Update();
		void StartBattle(Player* p, Enemy* e);

		Player* FightingPlayer;
		Enemy* FightingEnemy;

		Teams Winner;

		void FightOver();

		static void Quit();

		void EndGame(Teams winner);

	protected:
	private:
		//We shouldn't be assigning this around
		StateManager(const StateManager&);
		StateManager operator=(const StateManager&);

		State enumCurrentState;
		std::vector<GameState*> States;

		GameState* CurrentState();

};

#endif // STATEMANAGER_H
